// 向对象中添加方法
let game = {
  name: '闪耀暖暖',
}

// 声明一个对象
let methods = {
  up: Symbol(),
  down: Symbol(),
}

game[methods.up] = function () {
  console.log('向上');
}

game[methods.down] = function () {
  console.log('向下');
}

console.log(game); //{name: '闪耀暖暖', Symbol(): ƒ, Symbol(): ƒ}

let youxi = {
  name: '狼人杀',
  [Symbol('say')]: function () {
    console.log('我可以发言');
  }
}
console.log(youxi); //{name: '狼人杀', Symbol(say): ƒ}
